let mongodb = require("../server/config");

/*
* 账号数据模型
* */

let Schema = mongodb.mongoose.Schema;

let accountSchema = new Schema({
  userId: {type: String}, // 用户id
  superiorId :{type: String},  // 上级id
  account: {type: String}, // 账号
  accountName: {type: String}, // 账号名字
  accountPassword: {type: String}, // 账号密码
  createTime: {type: Date, default: Date.new}, // 创建时间
});

let accountModel = mongodb.mongoose.model("accounts", accountSchema);

exports.accountList = accountModel;
